package Home_Work.src.day03;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * 将当前系统时间以"yyyy-MM-dd HH:mm:ss"格式输出
 * 
 * @author Bonnie
 *
 */
public class Test02 {
	public static void main(String[] args) {
		long time = System.currentTimeMillis();
		Date date = new Date(time);
		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH : mm : ss");
		System.out.println(date);
		String dateStr = sdf.format(date);

		System.out.println(dateStr);
	}
}
